/*
 * http://www.sencha.com/learn/intro-to-panels/
 */
myApp.views.indexToolbar = Ext.extend(Ext.Panel, {
    fullscreen: true,
    dockedItems:[
        (function(){
            return new Ext.Toolbar({
                dock:'top',
                title:'Index/toolbar',
                items:[
                    {
                        text:'Sommaire',
                        handler:function(){
                            Ext.dispatch({
                                controller: "Index",
                                action:'index',
                                animation: { type: 'slide', direction: 'right' }
                            })
                        }
                    }
                ]
            })
        })()
    ],
    initComponent:function(){
        myApp.helpers.Events.addTimerListenersToView(this,'Index', 'toolbar');
        myApp.views.indexToolbar.superclass.initComponent.apply(this,arguments);
    }
});
Ext.reg('indexToolbar', myApp.views.indexToolbar);